﻿Namespace Sigortali.EskiSure
	Module Functions

		Function Oku(Token As Token, kimlik As String, bordrotar As Date) As Recordset
			Return Token.OpenSQL("select * from shesk where kimlik = @kimlik and bordrotar = @tarih", kimlik, bordrotar)
		End Function

		Sub Kaydet(Token As Token, kimlik As String, pasaport As String, sno As Integer, isyerino As String, bordro As String, bordrotar As Date, pek As Decimal, pogs As Integer, kaykul As String)
			Dim Rs As Recordset = Token.OpenSQL("select * from shesk where 1 = 0")
			Rs.AddNew()
			Rs.SetValues("kimlik,pasaport,sno,isyerino", kimlik, pasaport, sno, isyerino)
			Rs.SetValues("bordro,bordrotar,pek,pogs,kaykul,islemtar", bordro, bordrotar, pek, pogs, kaykul, Token.SysDate)
			Rs.Save()
		End Sub

	End Module
End Namespace